home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 August / Ahoy_Magazine_85-08_1985_Double_L.d64 / helicopter blade (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  929b  |  27 lines

  1. 0 print"[147]":poke53280,4:poke53281,1:poke646,11
  2. 1 rem sound effects
  3. 2 rem helicopter blades
  4. 3 rem humming sound in voice 0 suggests you are in helicopter
  5. 4 rem to hear more distant chopper, remove ":poke gt(0),17" from line 40
  6. 10 gosub 900:goto 100
  7. 20 for i=1 to 2:poke ad(i),48:poke sr(i),16:next:poke fh(1),20:poke fh(2),40
  8. 25 poke ad(0),34:poke sr(0),49:poke fh(0),10
  9. 30 poke vl,15:print "press shift to stop sound"
  10. 40 poke gt(1),129:poke gt(2),129:poke gt(0),17
  11. 50 for i=10 to 220 step 70:poke fh(1),i:poke fh(2),i:next
  12. 60 poke gt(1),0:poke gt(2),0:poke gt(0),0:if peek(653)=0 then 40
  13. 70 if peek(653)<>0 then 70
  14. 90 return
  15. 99 rem routine to play sounds when shift is pressed
  16. 100 print "press shift to hear sound"
  17. 110 if peek(653)=0 then 110
  18. 120 gosub 20:goto 100
  19. 898 rem routine to set up variables
  20. 899 rem set up sound control addresses
  21. 900 fl(0)=54272:fh(0)=54273:gt(0)=54276:ad(0)=54277:sr(0)=54278
  22. 905 for i=1 to 2:x=i*7:fl(i)=fl(0)+x:fh(i)=fh(0)+x:gt(i)=gt(0)+x:ad(i)=ad(0)+x
  23. 906 sr(i)=sr(0)+x:next
  24. 909 rem set volume address
  25. 910 vl=54296
  26. 990 return
  27.